import request from '@/utils/request'

export function login(data) {

  console.log("login=="+JSON.stringify(data))

  return request({
    // url: 'edu/vue-admin-template/user/login',
    // url: '/vue-admin-template/user/login',
    url: '/user/login',
    method: 'post',
    changeOrigin: true,
    data
  })
}

export function getInfo(token) {
  return request({
    // url: 'edu/vue-admin-template/user/info',
    // url: '/vue-admin-template/user/info',
    url: '/user/info',
    method: 'get',
    params: { token }
  })
}

export function logout(data) {
  return request({
    // url: 'edu/vue-admin-template/user/logout',
    // url: '/vue-admin-template/user/logout',
    url: '/user/logout',
    method: 'post',
  data
  })
}
